﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Register
</asp:Content>

<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Create a New Account</h2>
    <p>
        Use the form below to create a new account. 
    </p>
    <p>
        Passwords are required to be a minimum of <%=Html.Encode(ViewData["PasswordLength"])%> characters in length.
    </p>
    <%= Html.ValidationSummary("Account creation was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm("register", "account", FormMethod.Post, new {ID = "register_form"})) { %>
        <div>
            <fieldset>
                <legend>Account Information</legend>
                <p>
                    <div style="display:table-cell; width:150px">
                    <label class="formlabelstyle" for="username">Username:</label>
                    </div>
                    <div style="display:table-cell;">
                    <%= Html.TextBox("username", null, new {@class = "forminputstyle"}) %>
                    <%= Html.ValidationMessage("username") %>
                    </div>
                </p>
                <p>
                    <div style="display:table-cell; width:150px">
                    <label class="formlabelstyle" for="email">Email:</label>
                    </div>
                    <div style="display:table-cell;">
                    <%= Html.TextBox("email", null, new {@class = "forminputstyle"}) %>
                    <%= Html.ValidationMessage("email") %>
                    </div>
                </p>
                <p>
                    <div style="display:table-cell; width:150px">
                    <label class="formlabelstyle" for="password">Password:</label>
                    </div>
                    <div style="display:table-cell;">
                    <%= Html.Password("password", null, new {@class = "forminputstyle"}) %>
                    <%= Html.ValidationMessage("password") %>
                    </div>
                </p>
                <p>
                    <div style="display:table-cell; width:150px">
                    <label class="formlabelstyle" for="confirmPassword">Confirm password:</label>
                    </div>
                    <div style="display:table-cell;">
                    <%= Html.Password("confirmPassword", null, new {@class = "forminputstyle"}) %>
                    <%= Html.ValidationMessage("confirmPassword") %>
                    </div>
                </p>
                <p>
                <div class="buttonwrapper">
                    <a class="ovalbutton" style="margin-left: 6px" href="javascript:document.forms['register_form'].submit()"><span>Register</span></a>
                </div> 
                </p>
            </fieldset>
        </div>
    <% } %>
</asp:Content>
